<?php
abstract class BphInput extends BphFVisible{
	function __Construct($pname, $ptype){
		$this->content = new BphItem('input');
		parent::__Construct($pname);
		$this->content->AddAttribut('type', $ptype);
	}
}


class BphFText extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'text');
	}
	
	function SetLimit($pmaxlength){
		$this->content->AddAttribut('maxlength', $pmaxlength);
	}
}


class BphFPassword extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'password');
	}
}


class BphFNumber extends BphInput{
	function __Construct($pname, $prange=False){
		if ($prange)
			$type = 'range';
		else
			$type = 'number';
		parent::__Construct($pname, $type);
	}
	
	function SetLimit($pmin, $pmax, $pstep=1){
		$this->content->AddAttribut('min', $pmin);
		$this->content->AddAttribut('max', $pmax);
		$this->content->AddAttribut('step', $pstep);
	}
}



class BphFTel extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'tel');
	}
}


class BphFEmail extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'email');
	}
}


class BphFUrl extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'url');
	}
}


class BphFSearch extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'search');
	}
}


class BphFFile extends BphInput{
	function __Construct($pname){
		parent::__Construct($pname, 'file');
	}
}


class BphFCheckBox {}
?>
